<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <title>小区</title>
    <style>
     table {
         font-family: verdana,arial,sans-serif;
         font-size:11px;
         color:#333333;
         border-width: 1px;
         border-color: #666666;
         border-collapse: collapse;
         width: 100%;
     }
     table th {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #666666;
         background-color: #dedede;
         text-align: center;
     }
     table td {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #666666;
         background-color: #ffffff;
         text-align: center;
     }
    </style>
</head>
<body>

<table>
<tbody>

    <form action='/estates/upload' method='POST' enctype="multipart/form-data">
    <tr>
        <td>支持的模版格式</td>
        <td>
            <a href="/static/excel/upload_estate_info_template.csv">点击下载模版</a>
        </td>
    </tr>
    <tr>
        <td>上传小区配置信息</td>
        <td>
            <input type='file' name='file' accept=".csv">
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <input type="submit" value="批量导入覆盖">
        </td>
    </tr>
    </form>
</tbody>
</table>

<p>小区列表</p>

<table>
<thead>
    <tr>
        <th>ID</th>
        <th>名称</th>
        <th>自动维护地址单元值</th>
        <th>输出格式地址槽</th>
        <th>
            <a href='/estates/add'>添加</a>
        </th>
    </tr>
</thead>
    @foreach ($estates as $id => $estate)
    <tr>
        <td>{{ $id }}</td>
        <td>
            {{ $estate->name }}
        </td>
        <td>
            {{ $estate->get_is_auto_manage_value_description() }}
        </td>
        <td>
            {{ $estate->output_address_slot->rule }}
        </td>
        <td>
            <a href='/estates/detail/{{ $estate->id }}'>查看</a>
            <a href='/estates/update/{{ $estate->id }}'>修改</a>
            <a href='javascript:delete_{{ $estate->id }}.submit();'>删除</a>
            <form id='delete_{{ $estate->id }}' action='/estates/delete/{{ $estate->id }}' method='POST'></form>
        </td>
    </tr>
    @endforeach
<tbody>
</tbody>
</table>
</body>
</html>
